#include <stdio.h>
#include <stdlib.h>
#include <string.h>

// 声明结构体
struct Student {
  int id;
  char name[30];
  char gender;
  int age;
  char address[50];
};
int main(int argc, char *argv[]) {
  /* 结构体
   */
  struct Student s1;
  s1.id = 1001;
  strcpy(s1.name, "tom");
  s1.gender = 'M';
  s1.age = 12;
  strcpy(s1.address, "北京市海淀区中关村1街");
  printf("id = %d\nname = %s\ngender = %c\nage = %d\naddress = %s\n", s1.id,
         s1.name, s1.gender, s1.age, s1.address);
  return EXIT_SUCCESS;
}

struct Cat {
  char name[20];
  int age;
  char color[30];
};

// 人
struct Person {
  char name[20];
  int age;
  char gender;
  double weight;
};

// 通讯录
